package com.xbongbong.parent.factory;

import com.xbongbong.parent.dynamic.DynamicStrategyDefaultStrategy;
import com.xbongbong.parent.interfaces.DynamicStrategy;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;
import java.util.Objects;

/**
 * @author 吴峰
 * @date 2023/01/05 16:09
 */
@Component
public class BusinessDynamicFactory {

    @Resource
    private Map<Integer, DynamicStrategy> typeToDynamicStrategyMap;

    public DynamicStrategy getDynamicStrategyByBusinessType(Integer businessType) {
        DynamicStrategy dynamicStrategy = typeToDynamicStrategyMap.get(businessType);
        return dynamicStrategy;
    }
}
